package com.taotao.portal.controller;

import com.taotao.portal.service.ContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Package com.taotao.portal.controller
 * @Description:
 * @Author elwyn
 * @Date 2017/9/3 23:06
 * @Email elonyong@163.com
 */
@Controller
public class IndexController {

    @Autowired
    private ContentService contentService;

    @RequestMapping("/index")
    public String showIndex(Model model) {
        String contentList = contentService.getContentList();
        model.addAttribute("ad1", contentList);
        return "index";
    }
}
